package cn.fantasy.study.service.Impl;

import cn.fantasy.study.BeanFactory;
import cn.fantasy.study.dao.IUserDao;
import cn.fantasy.study.entity.User;
import cn.fantasy.study.service.IUserService;

public class UserServiceImpl implements IUserService {

    private IUserDao userDao = (IUserDao) BeanFactory.getBean("userDao");

    @Override
    public void register(User user) {
        userDao.save(user);
    }

    @Override
    public void login(String name, String password) {
        userDao.queryUserByNameAndPassword(name, password);
    }
}
